package cn.kgc.Thread.work.work03;

import java.util.concurrent.TimeUnit;

public class RegistrationTest {
    public static void main(String[] args) {
        Thread thread=new Thread(new Registration());
        thread.setPriority(Thread.MAX_PRIORITY);
        thread.start();
        for (int i = 0; i <50 ; i++) {
            System.out.println("普通号:"+(i+1)+"号病人在看病！");
            try {
                TimeUnit.MILLISECONDS.sleep(500L);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            if (i==9){
                try {
                    thread.join();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
